<!-- <div id="sign">

    <form class="layui-form">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">用户名: </label>
                    <div class="layui-input-inline">
                        <input [(ngModel)]="user.username" placeholder="username" class="layui-input" name="userneme">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">密码: </label>
                    <div class="layui-input-inline">
                        <input type="password" [(ngModel)]="user.password" placeholder="password" class="layui-input" name="password">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">房间号: </label>
                    <div class="layui-input-inline">
                        <input [(ngModel)]="user.roomId" placeholder="roomId" class="layui-input" name="roomId">
                    </div>
                </div>
            </div>
            <div style="text-align:center;">
                <button (click)="onSubmit()" class="layui-btn layui-btn-primary">注册</button>
                <button (click)="reset()" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </fieldset>

    </form>
</div> -->



<div id="layerFormSignUp">
    <form #formRef="ngForm" (ngSubmit)="onSubmit(formRef.value)" class="layui-form">
        <div id="header">
            <h1>注册新用户</h1>
            <br>
            <h2>LWM喜来登国际大酒店为您提供贴心服务</h2>
        </div>
        <fieldset ngModelGroup="login">
            <div class="layui-form">
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-md6 layui-col-md-offset3">
                            <label class="layui-form-label">Username </label>
                            <div class="layui-input-inline">
                                <input type="text" [(ngModel)]="user.username" required minlength="3" placeholder="username" class="layui-input" name="username">
                            </div>
                        </div>
                        <div class="layui-col-md3">
                            <!-- <label *ngIf="usernameRef.errors?.required" class="notice1">This is required</label>
                            <label *ngIf="usernameRef.errors?.minlength" class="notice">Should be at least 3 charactors</label>
                            <label *ngIf="auth?.hasError" class="notice1">{{auth.errMsg}}</label> -->
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-md6 layui-col-md-offset3">
                            <label class="layui-form-label">Password </label>
                            <div class="layui-input-inline">
                                <input type="password" [(ngModel)]="user.password" placeholder="password" class="layui-input" name="password">
                            </div>
                        </div>
                        <div class="layui-col-md3">
                            <!-- <label *ngIf="passwordRef.errors?.required" class="notice1">This is required</label> -->
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-md6 layui-col-md-offset3">
                            <label class="layui-form-label">RoomId </label>
                            <div class="layui-input-inline">
                                <input [(ngModel)]="user.roomId" placeholder="roomId" class="layui-input" name="roomId">
                            </div>
                        </div>
                        <div class="layui-col-md3">
                            <!-- <label *ngIf="passwordRef.errors?.required" class="notice1">This is required</label> -->
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" id="buttons" align="center">
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <button type="submit" class="layui-btn layui-btn-primary" (click)="onSubmit()">SignUp</button>
                            <button type="reset" class="layui-btn layui-btn-primary">Reset</button>
                        </div>
                    </div>
                </div>
            </div>
            <div id="button">
                <a href="index.html">
                    <i class="layui-icon">&#xe6af;</i> 返回首页
                </a>
                <br>
            </div>
        </fieldset>
    </form>
</div>